package ext.acae2.dms.bean;

public class DataBeanFactory {
	
	/**
	 * 设置DocumentBean属性值
	 * @param docBean 实例对象
	 * @param attrName 属性的名称
	 * @param attrValue 属相的值
	 */
	public static void setDocBeanValue(DocumentBean docBean,String attrName,String attrValue){
		
		if(attrName.equalsIgnoreCase("OBJNAME")){
			docBean.setOBJNAME(attrValue);
		}else if(attrName.equalsIgnoreCase("TITLE")){
			docBean.setTITLE(attrValue);
		}else if(attrName.equalsIgnoreCase("DOCUMENTID")){
			docBean.setDOCUMENTID(attrValue);
		}else if(attrName.equalsIgnoreCase("DOCUMENTTYPE")){
			docBean.setDOCUMENTTYPE(attrValue);
		}else if(attrName.equalsIgnoreCase("MODEL")){
			docBean.setMODEL(attrValue);
		}else if(attrName.equalsIgnoreCase("DESIGN")){
			docBean.setDESIGN(attrValue);
		}
	}
	
	
	public static void setEpmBeanValue(EPMDocumentBean epmBean,String attrName,String attrValue){
		//TODO
		
	}
	
	
	/**
	 * 设置PartBean属性值
	 * @param partBean 实例对象
	 * @param attrName 属性的名称
	 * @param attrValue 属性的值
	 */
	public static void setPartBeanValue(PartBean partBean,String attrName,String attrValue){
		if(attrName.equalsIgnoreCase("REMARK")){
			partBean.setREMARK(attrValue);
		}else if(attrName.equalsIgnoreCase("CHARACTERTYPE")){
			partBean.setCHARACTERTYPE(attrValue);
		}else if(attrName.equalsIgnoreCase("MASS")){
			partBean.setMASS(attrValue);
		}else if(attrName.equalsIgnoreCase("UNITE")){
			partBean.setUNITE(attrValue);
		}else if(attrName.equalsIgnoreCase("MATERIAL")){
			partBean.setMATERIAL(attrValue);
		}else if(attrName.equalsIgnoreCase("MATERIALSTANDARD")){
			partBean.setMATERIALSTANDARD(attrValue);
		}else if(attrName.equalsIgnoreCase("BLANKSPEC")){
			partBean.setBLANKSPEC(attrValue);
		}else if(attrName.equalsIgnoreCase("BLANKSTATE")){
			partBean.setBLANKSTATE(attrValue);
		}else if(attrName.equalsIgnoreCase("PARTTYPE")){
			partBean.setPARTTYPE(attrValue);
		}else if(attrName.equalsIgnoreCase("OBJNAME")){
			partBean.setOBJNAME(attrValue);
		}else if(attrName.equalsIgnoreCase("DRAWINGNO")){
			partBean.setDRAWINGNO(attrValue);
		}else if(attrName.equalsIgnoreCase("COPYRIGHT")){
			partBean.setCOPYRIGHT(attrValue);
		}else if(attrName.equalsIgnoreCase("MODEL")){
			partBean.setMODEL(attrValue);
		}else if(attrName.equalsIgnoreCase("DESIGN")){
			partBean.setDESIGN(attrValue);
		}else if(attrName.equalsIgnoreCase("PARTSOURCE")){
			partBean.setPARTSOURCE(attrValue);
		}
	}

}
